package com.qfedu.entity;

/**
 * 返回数据类型
 * @param <T>
 */
public class ResponseData<T> {

    public static final int SUCCESS_CODE=1;
    public static final int FAIL_CODE=0;

    public static final String SUCCESS_MSG="success";
    public static final String FAIL_MSG="fail";

//
//"code": 0,
//        "msg": "",
//        "count": 1000,  总条数
//        "data":

    // 时机工作中 返回数据code 0 失败      1    成功 // layui table 需要特殊该表，成功代表0   其他错误
    //  msg                 fail  失败  success  成功
    private int code;

    private String msg;

    private int count;

    private T data;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {

        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResponseData{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", count=" + count +
                ", data=" + data +
                '}';
    }
}
